#ifndef _BBGRAPHICSCACHE_H_
#define _BBGRAPHICSCACHE_H_

#include "BBSingleton.h"
#include <map>

class BBGraphics2D;

class BBGraphicsCache : public BBSingleton<BBGraphicsCache>
{
public:
	BBGraphics2D* addGraphics(const char* filePath);
	void removeGraphics(BBGraphics2D* graphic);
	BBGraphics2D* getGraphicsByKey(const char* filePath);
	void purgeGraphicCache();
private:
	BBGraphicsCache(void);
	~BBGraphicsCache(void);
	friend class BBSingleton<BBGraphicsCache>;
private:
	std::map<const char*,BBGraphics2D*> m_pGraphicsList;
};

#endif  //_BBGRAPHICSCACHE_H_